package StudyCode.summary.mycollection;

import java.util.Collection;
import java.util.Collections;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CreateUnmodifiableCollection {
	public static void main(String[] argv) {
		Collection c = java.util.Arrays.asList("科技与人文", "www.tah1986.com");
		System.out.println(unmodifiableCollection(c));
	}

	public static <T> Collection<T> unmodifiableCollection(
			final Collection<? extends T> c) {
		return (c == null) ? Collections.<T>emptyList() : Collections.unmodifiableCollection(c);
	}
}
